package com.example.lotterysystem.mapper;

import com.example.lotterysystem.pojo.dataobject.Encrypt;
import com.example.lotterysystem.pojo.dataobject.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    int countByMail(@Param("email") String email);

    int countByPhone(@Param("phoneNumber") Encrypt encrypt);

    void insertUser(UserDO userDO);

    UserDO selectByEmail(@Param("email") String email);

    UserDO selectByPhoneNumber(Encrypt phoneNumber);

    List<UserDO> selectUserListByIdentity(@Param("identity") String identity);

    List<Long> selectExistByIds(@Param("items") List<Long> userIds);

    List<UserDO> batchSelectByIds(@Param("items") List<Long> ids);
}
